package com.zhj.helloframework.mvc.render.impl;

import com.zhj.helloframework.mvc.RequestProcessorChain;
import com.zhj.helloframework.mvc.render.ResultRender;

/**
 * @Author: zhj
 * @Description: 默认结果渲染器
 * @Date: 2021/11/16 15:28
 * @Version: 1.0
 */
public class DefaultResultRender implements ResultRender {
    @Override
    public void render(RequestProcessorChain requestProcessorChain) throws Exception {
        // 通过requestProcessorChain获取response对象，并将责任链处理器中的http状态码设置进去
        requestProcessorChain.getResponse().setStatus(requestProcessorChain.getResponseCode());
    }
}
